﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiContextualColors : OdRxObject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiContextualColors(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiContextualColors_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiContextualColors obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiContextualColors()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiContextualColors(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdGiContextualColors cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiContextualColors_cast(OdRxObject.getCPtr(pObj));
			OdGiContextualColors result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiContextualColors_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiContextualColors_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiContextualColors_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGiContextualColors createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiContextualColors_createObject();
			OdGiContextualColors result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor gridMajorLines()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_gridMajorLines(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor gridMinorLines()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_gridMinorLines(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor gridAxisLines()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_gridAxisLines(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool gridMajorLineTintXYZ()
		{
			bool result = GlobalsPINVOKE.OdGiContextualColors_gridMajorLineTintXYZ(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool gridMinorLineTintXYZ()
		{
			bool result = GlobalsPINVOKE.OdGiContextualColors_gridMinorLineTintXYZ(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool gridAxisLineTintXYZ()
		{
			bool result = GlobalsPINVOKE.OdGiContextualColors_gridAxisLineTintXYZ(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightGlyphs()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightGlyphs(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightHotspot()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightHotspot(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightFalloff()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightFalloff(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightStartLimit()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightStartLimit(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightEndLimit()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightEndLimit(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightShapeColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightShapeColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor lightDistanceColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_lightDistanceColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor webMeshColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_webMeshColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor webMeshMissingColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_webMeshMissingColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor cameraGlyphs()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_cameraGlyphs(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor cameraFrustrum()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_cameraFrustrum(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor cameraClipping()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_cameraClipping(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setContextFlags(uint nFlags, bool bSet)
		{
			GlobalsPINVOKE.OdGiContextualColors_setContextFlags__SWIG_0(this.swigCPtr, nFlags, bSet);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setContextFlags(uint nFlags)
		{
			GlobalsPINVOKE.OdGiContextualColors_setContextFlags__SWIG_1(this.swigCPtr, nFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool flagsSet(uint nFlags)
		{
			bool result = GlobalsPINVOKE.OdGiContextualColors_flagsSet(this.swigCPtr, nFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmEntityColor contextualColor(OdGiContextualColors.ColorType arg0)
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiContextualColors_contextualColor(this.swigCPtr, (int)arg0), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool contextualColorTint(OdGiContextualColors.ColorTint arg0)
		{
			bool result = GlobalsPINVOKE.OdGiContextualColors_contextualColorTint(this.swigCPtr, (int)arg0);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum ColorType
		{
			kGridMajorLinesColor,
			kGridMinorLinesColor,
			kGridAxisLinesColor,
			kLightGlyphsColor,
			kLightHotspotColor,
			kLightFalloffColor,
			kLightStartLimitColor,
			kLightEndLimitColor,
			kLightShapeColor,
			kLightDistanceColor,
			kWebMeshColor,
			kWebMeshMissingColor,
			kCameraGlyphsColor,
			kCameraFrustrumColor,
			kCameraClippingColor,
			kNumColors
		}

		public enum ColorTint
		{
			kGridMajorLineTint,
			kGridMinorLineTint,
			kGridAxisLineTint,
			kNumTintFlags
		}
	}
}
